/**
 * Generate time : 2011-05-26 15:59:24
 * Version : 1.0.1.V20070717
 */
package com.baosight.sczx.zm.cm.domain;

import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;

/**
 * ZMCMDepot
 * 
 */
public class ZMCMDepot extends DaoEPBase {

	private String fdKeyId = " "; /* 主键 */
	private String fdDepotCode = " "; /* 库房编号 */
	private String fdDepotName = " "; /* 库房名称 */
	private String fdDepotLevel = " "; /* 库房级别 */
	private String fdRemark = " "; /* 备注 */
	private String fdStatus = " "; /* 状态 */

	/**
	 * initialize the metadata
	 */
	public void initMetaData() {
		EiColumn eiColumn;

		eiColumn = new EiColumn("fdKeyId");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("主键");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdDepotCode");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("库房编号");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdDepotName");
		eiColumn.setFieldLength(80);
		eiColumn.setDescName("库房名称");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdDepotLevel");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("库房级别");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdRemark");
		eiColumn.setFieldLength(500);
		eiColumn.setDescName("备注");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdStatus");
		eiColumn.setFieldLength(10);
		eiColumn.setDescName("状态");
		eiMetadata.addMeta(eiColumn);

	}

	/**
	 * the constructor
	 */
	public ZMCMDepot() {
		initMetaData();
	}

	/**
	 * get the fdKeyId - 主键
	 * 
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}

	/**
	 * set the fdKeyId - 主键
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}

	/**
	 * get the fdDepotCode - 库房编号
	 * 
	 * @return the fdDepotCode
	 */
	public String getFdDepotCode() {
		return this.fdDepotCode;
	}

	/**
	 * set the fdDepotCode - 库房编号
	 */
	public void setFdDepotCode(String fdDepotCode) {
		this.fdDepotCode = fdDepotCode;
	}

	/**
	 * get the fdDepotName - 库房名称
	 * 
	 * @return the fdDepotName
	 */
	public String getFdDepotName() {
		return this.fdDepotName;
	}

	/**
	 * set the fdDepotName - 库房名称
	 */
	public void setFdDepotName(String fdDepotName) {
		this.fdDepotName = fdDepotName;
	}

	/**
	 * get the fdDepotLevel - 库房级别
	 * 
	 * @return the fdDepotLevel
	 */
	public String getFdDepotLevel() {
		return this.fdDepotLevel;
	}

	/**
	 * set the fdDepotLevel - 库房级别
	 */
	public void setFdDepotLevel(String fdDepotLevel) {
		this.fdDepotLevel = fdDepotLevel;
	}

	/**
	 * get the fdRemark - 备注
	 * 
	 * @return the fdRemark
	 */
	public String getFdRemark() {
		return this.fdRemark;
	}

	/**
	 * set the fdRemark - 备注
	 */
	public void setFdRemark(String fdRemark) {
		this.fdRemark = fdRemark;
	}

	/**
	 * get the fdStatus - 状态
	 * 
	 * @return the fdStatus
	 */
	public String getFdStatus() {
		return this.fdStatus;
	}

	/**
	 * set the fdStatus - 状态
	 */
	public void setFdStatus(String fdStatus) {
		this.fdStatus = fdStatus;
	}

	/**
	 * get the value from Map
	 */
	@SuppressWarnings("rawtypes")
	public void fromMap(Map map) {

		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdDepotCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdDepotCode")), fdDepotCode));
		setFdDepotName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdDepotName")), fdDepotName));
		setFdDepotLevel(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdDepotLevel")), fdDepotLevel));
		setFdRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdRemark")), fdRemark));
		setFdStatus(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdStatus")), fdStatus));
	}

	/**
	 * set the value to Map
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map toMap() {

		Map map = new HashMap();
		map.put("fdKeyId", StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));
		map.put("fdDepotCode", StringUtils.toString(fdDepotCode, eiMetadata.getMeta("fdDepotCode")));
		map.put("fdDepotName", StringUtils.toString(fdDepotName, eiMetadata.getMeta("fdDepotName")));
		map.put("fdDepotLevel", StringUtils.toString(fdDepotLevel, eiMetadata.getMeta("fdDepotLevel")));
		map.put("fdRemark", StringUtils.toString(fdRemark, eiMetadata.getMeta("fdRemark")));
		map.put("fdStatus", StringUtils.toString(fdStatus, eiMetadata.getMeta("fdStatus")));

		return map;

	}
}